﻿//-----------------------------------------------------------------------
// <copyright file="Copyright.cs" author="Michael Herndon">
//     Copyright (c) Company.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Amplify.CodeDom
{
	using System;
	using System.Collections.Generic;
	using System.CodeDom;
	using System.Linq;
	using System.Text;

	public static partial class Mixin
	{


		public static CodeNamespace AddNamespace(this CodeCompileUnit unit, string nameSpace)
		{
			CodeNamespace obj = new CodeNamespace(nameSpace);
			unit.Namespaces.Add(obj);
			return obj;
		}

		public static CodeNamespace Add(this CodeNamespaceCollection unit, string nameSpace)
		{
			CodeNamespace obj = new CodeNamespace(nameSpace);
			unit.Add(obj);
			return obj;
		}

		public static CodeNamespace GetNamespace(this CodeCompileUnit unit, string nameSpace)
		{
			return unit.Namespaces.Find<CodeNamespace>(item => item.Name == nameSpace);
		}

	}
}
